package com.ruiben.mall.pojo;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;

@Table(name = "user_cart")
public class UserCart {
    @Id
    private String id;

    /**
     * 用户id
     */
    @Column(name = "userId")
    private String userid;

    /**
     * 商品id
     */
    @Column(name = "productId")
    private String productid;

    /**
     * 购买数量
     */
    @Column(name = "productNum")
    private Integer productnum;

    /**
     * 商品总价
     */
    @Column(name = "product_price")
    private Long productPrice;

    /**
     * 商品属性名字
     */
    @Column(name = "product_attr_name")
    private String productAttrName;

    /**
     * 商品属性id
     */
    @Column(name = "product_attr_id")
    private String productAttrId;

    private ShopProduct shopProduct;

    public ShopProduct getShopProduct() {
        return shopProduct;
    }

    public void setShopProduct(ShopProduct shopProduct) {
        this.shopProduct = shopProduct;
    }

    /**
     * @return id
     */
    public String getId() {
        return id;
    }

    /**
     * @param id
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * 获取用户id
     *
     * @return userId - 用户id
     */
    public String getUserid() {
        return userid;
    }

    /**
     * 设置用户id
     *
     * @param userid 用户id
     */
    public void setUserid(String userid) {
        this.userid = userid;
    }

    /**
     * 获取商品id
     *
     * @return productId - 商品id
     */
    public String getProductid() {
        return productid;
    }

    /**
     * 设置商品id
     *
     * @param productid 商品id
     */
    public void setProductid(String productid) {
        this.productid = productid;
    }

    /**
     * 获取购买数量
     *
     * @return productNum - 购买数量
     */
    public Integer getProductnum() {
        return productnum;
    }

    /**
     * 设置购买数量
     *
     * @param productnum 购买数量
     */
    public void setProductnum(Integer productnum) {
        this.productnum = productnum;
    }

    /**
     * 获取商品总价
     *
     * @return product_price - 商品总价
     */
    public Long getProductPrice() {
        return productPrice;
    }

    /**
     * 设置商品总价
     *
     * @param productPrice 商品总价
     */
    public void setProductPrice(Long productPrice) {
        this.productPrice = productPrice;
    }

    /**
     * 获取商品属性名字
     *
     * @return product_attr_name - 商品属性名字
     */
    public String getProductAttrName() {
        return productAttrName;
    }

    /**
     * 设置商品属性名字
     *
     * @param productAttrName 商品属性名字
     */
    public void setProductAttrName(String productAttrName) {
        this.productAttrName = productAttrName;
    }

    /**
     * 获取商品属性id
     *
     * @return product_attr_id - 商品属性id
     */
    public String getProductAttrId() {
        return productAttrId;
    }

    /**
     * 设置商品属性id
     *
     * @param productAttrId 商品属性id
     */
    public void setProductAttrId(String productAttrId) {
        this.productAttrId = productAttrId;
    }
}